﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DataEntity;
using DataAccess;
using System.Diagnostics;
using System.Web.UI.WebControls;
using BusinessLogic.Controller;
namespace BusinessLogic.Controller
{
    public partial class PropertyTypeControlSettingController
    {
        public bool IsVisible(int propertyTypeID,string clientID)
        {
            var data = GetByPropertyID(propertyTypeID, clientID);
            if (data.Count > 0)
            {
                if (data[0].IsVisible)
                {
                    return true;
                }
                else
                {
                    return false;
                }
            }
            else
            {
                return true;
            }
        }

        public List<PropertyTypeControlSetting> GetByPropertyID(int propertyTypeID, string clientID)
        {
            var data = new DataProvider().PropertyTypeControlSettingGetbyPropertyTypeID(propertyTypeID, clientID);
            return data;
        }
    }
}
